package com.proxy;

import java.util.List;

/**
 * User: yuanjianpeng
 * Date: 2019/1/12
 * Project: webServiceServerTest
 * Version: 1.0
 * Description:
 */
public class TestProxy {

    private UserQueryService userQueryService = new UserQueryService();

    public Result<List<UserDto>> userQueryByUserName(String userName){
        return RemoteService.execute(userName, new InvokeTemplate<String, List<UserDto>>() {
            @Override
            protected Result<List<UserDao>> invoke(String request) {
                return userQueryService.userQueryByUserName(request);
            }

            @Override
            protected Converter cunstomConvert() {
                return UserDaoAndUserDtoCovert.INSANCE;
            }
        });
    }
}
